import request from '@/utils/request'
//1.查询下一级分类集合
export const listBrands = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/brand/page/${pageNum}/${pageSize}`,
    method: 'get',
  })
}
//根据id删除品牌
export const DeleteById = id => {
  return request({
    url: `/admin/product/brand/${id}`,
    method: 'delete',
  })
}
//添加品牌
export const Save = data => {
  return request({
    url: `/admin/product/brand`,
    method: 'post',
    data,
  })
}

//根据id查询品牌
export const GetById = id => {
  return request({
    url: `/admin/product/brand/${id}`,
    method: 'get',
  })
}
//更新品牌
export const UpdateById = data => {
  return request({
    url: `/admin/product/brand`,
    method: 'put',
    data,
  })
}
//查询所有品牌
export const ListAll = () => {
  return request({
    url: `/admin/product/brand`,
    method: 'get',
  })
}
